package com.vladmr.sleepytimepicker;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity {
	private static final String TAG = "sleepytimepicker";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_activity);
		SetHandlers();
		Log.i(TAG, "MainActivity OK");
	}
	
	/**
	 * set buttons handlers
	 */
	protected void SetHandlers(){
		Button btn_fallasleep = (Button)findViewById(R.id.btn_fallasleep);
		Button btn_wakeup = (Button)findViewById(R.id.btn_wakeup);
		
		btn_fallasleep.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this,ChooseFallasleepActivity.class);
				startActivity(intent);
			}
		});
		
		btn_wakeup.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this,ChooseWakeupActivity.class);
				startActivity(intent);			
			}
		});
	}

}
